package com.example.nick.bodyapplication.compose

import android.util.Log
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.launch

class MkViewModel : ViewModel() {
    var currentChat: Boolean by mutableStateOf(false)
    var curDoSomethings: Int by mutableStateOf(0)

    var openModule: Boolean? by mutableStateOf(null)

    fun doSomethings(temperature: Int) {
        currentChat = true
        ++curDoSomethings
        viewModelScope.launch {
            Log.i("Compose", "run doSomethings temperature:$temperature, ${Thread.currentThread().name}, currentChat:$currentChat, curDoSomethings:$curDoSomethings")
        }
    }
}